<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hello AJAX</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <script>
        $(document).ready(function () {

            $("#bt01").click(function () {
                $.ajax({
                    url: "test.txt", success: function (result) {
                        $("#div1").html(result)
                    }
                });
            });
            $("#bt02").click(function () {
                $.get("/apk/get_test", function (data, status) {
                    console.log("数据：" + data + "\t状态:" + status);
                    alert("数据：" + data + "\t状态:" + status);
                });
            });
        });

    </script>
</head>
<body>
<div id="div1"><h2>修改文本内容</h2></div>
<button id="bt01">获取外部内容</button>
<button id="bt02">发送http请求并返回结果</button>
</body>
</html>